package view;

import com.edu.ViewResult;

import java.io.IOException;

public class RedirectViewResult extends ViewResult{

    private String url;

    public RedirectViewResult(String url){
        this.url = url;
    }

    @Override
    public void execute() {
        try {
            getResponse().sendRedirect(this.url);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
